package com.xy.ds.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xy.ds.entity.Test;
import com.xy.ds.mapper.TestMapper;
import org.springframework.stereotype.Service;

@Service
public class TestServiceImpl extends ServiceImpl<TestMapper, Test> implements TestService {
    @Override
    public void saveTest() {
        Test test = new Test();
        test.setName("xy");
        this.baseMapper.insert(test);
    }

    @Override
    @DS("read")
    public void saveTestR() {
        Test test = new Test();
        test.setName("xyR");
        this.baseMapper.insert(test);
    }
}
